<?php
Tag::css('jquery-ui');
echo Html::includeCss();
echo Tag::js('propios/jquery.min');
echo Tag::js('propios/jquery-ui.min');
View::content();

?>

<script type="text/javascript">
$(document).ready(function() {
$('#guiadedespacho_fecha_llegada_gui').datepicker();
});
</script>

<?php

echo "<center>";
echo "<table id='box-table-a'>";
echo "<tr>";
echo "<td colspan='2'>";
echo "<center><h1>Ingresar guia de despacho</h1></center>";
echo "</td>";
echo "</tr>";

echo Form::open('guiadedespacho/ingresar','post',"name='guiadedespacho'");

echo "<tr>";
echo "<td>";
echo Form::label("Proveedor: ",'proveedor');
echo "</td>";
echo "<td>";
echo Form::dbSelect('guiadedespacho.proveedor_id', 'nombre_prov', array("proveedor","find","conditions: estado_prov='1'"),'-Seleccione-');
echo "</td>";
echo "</tr>";

echo "<tr>";
echo "<td>";
echo Form::label("Orden de compra: ",'ordendecompra');
echo "</td>";
echo "<td>";
echo Form::dbSelect('guiadedespacho.ordendecompra_id', 'id', array("ordendecompra","find","conditions: estado_ord='1'"),'-Seleccione-');
echo "</td>";
echo "</tr>";

echo "<tr>";
echo "<td>";
echo Form::label("Nº gu&iacute;a de despacho: ",'nro_gui');
echo "</td>";
echo "<td>";
echo Form::text('guiadedespacho.nro_gui');
echo "</td>";
echo "</tr>";

echo "<tr>";
echo "<td>";
echo Form::label("Fecha llegada: ", "fechaguia");
echo "</td>";
echo "<td>";
echo Form::text('guiadedespacho.fecha_llegada_gui',null);
echo "</td>";
echo "</tr>";

echo "<tr>";
echo "<td>";
echo Form::label("Cantidad de materiales: ",'nro_gui');
echo "</td>";
echo "<td>";
echo Form::text('guiadedespacho.cantidadmateriales_gui');
echo "</td>";
echo "</tr>";

echo form::hidden('guiadedespacho.estado_gui',null,1);
echo "<tr>";
echo "<td colspan='2'><center>";
echo form::submit('Ingresar','class="botonPublicar"');
echo "</center></td>";
echo "</tr>";

echo Form::close();

echo "</table>";
echo "</center>";
?>

